import request from '@/utils/request'

// 查询货物类型列表
export function listTypes(query) {
  return request({
    url: '/basic/types/list',
    method: 'get',
    params: query
  })
}

// 查询货物类型详细
export function getTypes(cargoTypeId) {
  return request({
    url: '/basic/types/' + cargoTypeId,
    method: 'get'
  })
}

// 新增货物类型
export function addTypes(data) {
  return request({
    url: '/basic/types',
    method: 'post',
    data: data
  })
}

// 修改货物类型
export function updateTypes(data) {
  return request({
    url: '/basic/types',
    method: 'put',
    data: data
  })
}

// 删除货物类型
export function delTypes(cargoTypeId) {
  return request({
    url: '/basic/types/' + cargoTypeId,
    method: 'delete'
  })
}
